|
Eclipse Platform Pre-release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.EditorPart
org.eclipse.ui.texteditor.AbstractTextEditor
org.eclipse.ui.texteditor.StatusTextEditor
org.eclipse.ui.texteditor.ExtendedTextEditor
org.eclipse.ui.editors.text.TextEditor
The standard text editor for file resources (IFile
).
This editor has id "org.eclipse.ui.DefaultTextEditor"
.
The editor's context menu has id #TextEditorContext
.
The editor's ruler context menu has id #TextRulerContext
.
The workbench will automatically instantiate this class when the default editor is needed for a workbench window.
Nested Class Summary |
Nested classes inherited from class org.eclipse.ui.texteditor.AbstractTextEditor |
AbstractTextEditor.LineStartAction |
Nested classes inherited from class org.eclipse.ui.texteditor.ITextEditorExtension3 |
ITextEditorExtension3.InsertMode |
Field Summary | |
protected DefaultEncodingSupport |
fEncodingSupport
The encoding support for the editor. |
Fields inherited from class org.eclipse.ui.texteditor.ExtendedTextEditor |
fAnnotationAccess, fLineNumberRulerColumn, fOverviewRuler, fSourceViewerDecorationSupport |
Fields inherited from interface org.eclipse.ui.IEditorPart |
PROP_DIRTY, PROP_INPUT |
Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
PROP_TITLE |
Fields inherited from interface org.eclipse.ui.texteditor.ITextEditorExtension3 |
INSERT, OVERWRITE, SMART_INSERT |
Constructor Summary | |
TextEditor()
Creates a new text editor. |
Method Summary | |
protected void |
createActions()
Creates this editor's standard actions and connects them with the global workbench actions. |
void |
dispose()
The AbstractTextEditor implementation of this
IWorkbenchPart method may be extended by subclasses. |
void |
doSave(IProgressMonitor monitor)
The AbstractTextEditor implementation of this
IEditorPart method may be extended by subclasses. |
void |
doSaveAs()
The AbstractTextEditor implementation of this
IEditorPart method calls performSaveAs . |
protected void |
doSetInput(IEditorInput input)
Internal setInput method. |
Object |
getAdapter(Class adapter)
Returns an object which is an instance of the given class associated with this object. |
protected String |
getStatusBanner(IStatus status)
Returns a banner for the given status. |
protected String |
getStatusHeader(IStatus status)
Returns a header for the given status |
protected String |
getStatusMessage(IStatus status)
Returns a message for the given status. |
protected void |
initializeEditor()
Initializes this editor. |
protected void |
initializeKeyBindingScopes()
Initializes the key binding scopes of this editor. |
protected void |
installEncodingSupport()
Installs the encoding support on the given text editor. |
boolean |
isSaveAsAllowed()
The AbstractTextEditor implementation of this
IEditorPart method returns false . |
protected void |
performSaveAs(IProgressMonitor progressMonitor)
The TextEditor implementation of this AbstractTextEditor
method asks the user for the workspace path of a file resource and saves the document there. |
protected void |
updatePropertyDependentActions()
Updates all property dependent actions. |
Methods inherited from class org.eclipse.ui.texteditor.StatusTextEditor |
createStatusControl, doRevertToSaved, sanityCheckState, updatePartControl, updateStatusField |
Methods inherited from class org.eclipse.ui.part.EditorPart |
getEditorInput, getEditorSite, getTitleToolTip |
Methods inherited from class org.eclipse.ui.part.WorkbenchPart |
addPropertyListener, getConfigurationElement, getDefaultImage, getJobChangeListener, getSite, getTitle, getTitleImage, removePropertyListener, setInitializationData, setSite, setTitle, setTitleImage, setTitleToolTip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.ui.IEditorPart |
getEditorInput, getEditorSite |
Methods inherited from interface org.eclipse.ui.IWorkbenchPart |
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener |
Field Detail |
protected DefaultEncodingSupport fEncodingSupport
Constructor Detail |
public TextEditor()
Method Detail |
protected void initializeEditor()
initializeEditor
in class ExtendedTextEditor
protected void initializeKeyBindingScopes()
initializeKeyBindingScopes
in class ExtendedTextEditor
public void dispose()
AbstractTextEditor
AbstractTextEditor
implementation of this
IWorkbenchPart
method may be extended by subclasses.
Subclasses must call super.dispose()
.
dispose
in interface IWorkbenchPart
dispose
in class ExtendedTextEditor
public void doSaveAs()
AbstractTextEditor
AbstractTextEditor
implementation of this
IEditorPart
method calls performSaveAs
.
Subclasses may reimplement.
doSaveAs
in interface ISaveablePart
doSaveAs
in class AbstractTextEditor
public void doSave(IProgressMonitor monitor)
AbstractTextEditor
AbstractTextEditor
implementation of this
IEditorPart
method may be extended by subclasses.
doSave
in interface ISaveablePart
doSave
in class AbstractTextEditor
monitor
- the progress monitor for communicating result state or null
protected void installEncodingSupport()
Subclasses may override to install their own encoding support or to disable the default encoding support.
protected void performSaveAs(IProgressMonitor progressMonitor)
TextEditor
implementation of this AbstractTextEditor
method asks the user for the workspace path of a file resource and saves the document there.
performSaveAs
in class AbstractTextEditor
progressMonitor
- the progress monitor to be usedpublic boolean isSaveAsAllowed()
AbstractTextEditor
AbstractTextEditor
implementation of this
IEditorPart
method returns false
.
Subclasses may override.
isSaveAsAllowed
in interface ISaveablePart
isSaveAsAllowed
in class AbstractTextEditor
protected void createActions()
AbstractTextEditor
Subclasses may extend.
createActions
in class ExtendedTextEditor
protected String getStatusHeader(IStatus status)
StatusTextEditor
getStatusHeader
in class StatusTextEditor
status
- the status whose message is returned
protected String getStatusBanner(IStatus status)
StatusTextEditor
getStatusBanner
in class StatusTextEditor
status
- the status whose message is returned
protected String getStatusMessage(IStatus status)
StatusTextEditor
getStatusMessage
in class StatusTextEditor
status
- the status whose message is returned
protected void doSetInput(IEditorInput input) throws CoreException
AbstractTextEditor
setInput
method.
doSetInput
in class StatusTextEditor
CoreException
public Object getAdapter(Class adapter)
IAdaptable
null
if
no such object can be found.
getAdapter
in interface IAdaptable
getAdapter
in class ExtendedTextEditor
protected void updatePropertyDependentActions()
AbstractTextEditor
updatePropertyDependentActions
in class AbstractTextEditor
|
Eclipse Platform Pre-release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |